<template>
	<view class="detail">
		<image :src="'http://124.93.196.45:10001'+detail.cover" style="width: 100%; height: 300px;"></image>
		<view class="d1">
			<text>{{detail.name}}</text>
		</view>
		<view class="d2">
			<text>想看人数：{{detail.likeNum}}</text>
			<text>评分：{{detail.score}}分</text>
		</view>
		<view class="d3">
			<text>上映时间：{{detail.playDate}}</text>
		</view>
		<u-button type="primary" text="主页" @click="tonext"></u-button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:0,
				detail:{}
			}
		},
		onLoad(options) {
			this.id=options.id
			this.getdetail()
		},
		methods: {
			getdetail(){
				this.api.get('/prod-api/api/movie/film/detail/'+this.id).then(res=>{
					this.detail=res.data.data
				})
			},
			tonext(){
				uni.redirectTo({
					url:'/pages/other/movie/movie'
				})
			}
		}
	}
</script>

<style lang="scss">
.d1{
	font-size: 28px;
	text-align: center;
	margin-bottom: 20px;
}
.d2{
	font-size: 18px;
	display: flex;
	justify-content: space-between;
	margin-bottom: 20px;
}
.d3{
	font-size: 19px;
	text-align: center;
	margin-bottom: 20px;
}
</style>
